package com.xiaoshuidi.cloud.module.iot.uitils;

/**
 * @author Carl
 * create 2019/12/09
 * email Carl.Sun@ixiaoshuidi.com
 **/
public class ShangtangSignUtil {

    /**
     * 商汤计算方法：sign=md5(timestamp#app_secret)
     *
     * @param secret
     * @param timestamp
     * @return
     */
    public static String encryptSign(String secret, Long timestamp) {
        StringBuilder md5 = new StringBuilder();
        md5.append(timestamp).append("#").append(secret);
        String sign = MD5Util.MD5Encode(md5.toString());
        return sign;
    }

}
